// 城市医院模拟数据
// 每个城市包含约10个医院标记点

export const cityHospitalData = {
    // 北京市医院数据
    beijing: [
        {
            id: 1001,
            longitude: 116.397128,
            latitude: 39.916527,
            title: '北京协和医院',
            desc: '三甲医院，综合实力强',
            distance: 0.5,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1002,
            longitude: 116.407128,
            latitude: 39.926527,
            title: '北京友谊医院',
            desc: '三甲医院，专科特色',
            distance: 1.2,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1003,
            longitude: 116.387128,
            latitude: 39.906527,
            title: '北京朝阳医院',
            desc: '三甲医院，急诊科强',
            distance: 0.8,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1004,
            longitude: 116.417128,
            latitude: 39.936527,
            title: '北京同仁医院',
            desc: '三甲医院，眼科专科',
            distance: 2.1,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1005,
            longitude: 116.377128,
            latitude: 39.896527,
            title: '北京天坛医院',
            desc: '三甲医院，神经外科',
            distance: 1.5,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1006,
            longitude: 116.427128,
            latitude: 39.946527,
            title: '北京安贞医院',
            desc: '三甲医院，心血管专科',
            distance: 2.3,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1007,
            longitude: 116.367128,
            latitude: 39.886527,
            title: '北京儿童医院',
            desc: '三甲医院，儿科专科',
            distance: 1.8,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1008,
            longitude: 116.437128,
            latitude: 39.956527,
            title: '北京妇产医院',
            desc: '三甲医院，妇产科专科',
            distance: 2.5,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1009,
            longitude: 116.357128,
            latitude: 39.876527,
            title: '北京口腔医院',
            desc: '三甲医院，口腔专科',
            distance: 2.0,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 1010,
            longitude: 116.447128,
            latitude: 39.966527,
            title: '北京肿瘤医院',
            desc: '三甲医院，肿瘤专科',
            distance: 2.8,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
    ],

    // 上海市医院数据
    shanghai: [
        {
            id: 2001,
            longitude: 121.473701,
            latitude: 31.230416,
            title: '上海瑞金医院',
            desc: '三甲医院，综合实力强',
            distance: 0.3,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2002,
            longitude: 121.483701,
            latitude: 31.240416,
            title: '上海华山医院',
            desc: '三甲医院，神经外科',
            distance: 0.8,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2003,
            longitude: 121.463701,
            latitude: 31.220416,
            title: '上海中山医院',
            desc: '三甲医院，心血管专科',
            distance: 1.2,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2004,
            longitude: 121.493701,
            latitude: 31.250416,
            title: '上海仁济医院',
            desc: '三甲医院，消化内科',
            distance: 1.5,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2005,
            longitude: 121.453701,
            latitude: 31.210416,
            title: '上海新华医院',
            desc: '三甲医院，儿科专科',
            distance: 1.8,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2006,
            longitude: 121.503701,
            latitude: 31.260416,
            title: '上海第一人民医院',
            desc: '三甲医院，综合医院',
            distance: 2.0,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2007,
            longitude: 121.443701,
            latitude: 31.200416,
            title: '上海第六人民医院',
            desc: '三甲医院，骨科专科',
            distance: 2.2,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2008,
            longitude: 121.513701,
            latitude: 31.270416,
            title: '上海第九人民医院',
            desc: '三甲医院，口腔专科',
            distance: 2.5,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2009,
            longitude: 121.433701,
            latitude: 31.190416,
            title: '上海妇产科医院',
            desc: '三甲医院，妇产科专科',
            distance: 2.8,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 2010,
            longitude: 121.523701,
            latitude: 31.280416,
            title: '上海肿瘤医院',
            desc: '三甲医院，肿瘤专科',
            distance: 3.0,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
    ],

    // 广州市医院数据
    guangzhou: [
        {
            id: 3001,
            longitude: 113.264385,
            latitude: 23.129163,
            title: '广州中山大学附属第一医院',
            desc: '三甲医院，综合实力强',
            distance: 0.4,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3002,
            longitude: 113.274385,
            latitude: 23.139163,
            title: '广州南方医院',
            desc: '三甲医院，综合医院',
            distance: 0.9,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3003,
            longitude: 113.254385,
            latitude: 23.119163,
            title: '广州医科大学附属第一医院',
            desc: '三甲医院，呼吸专科',
            distance: 1.3,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3004,
            longitude: 113.284385,
            latitude: 23.149163,
            title: '广州中医药大学第一附属医院',
            desc: '三甲医院，中医专科',
            distance: 1.6,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3005,
            longitude: 113.244385,
            latitude: 23.109163,
            title: '广州军区总医院',
            desc: '三甲医院，综合医院',
            distance: 1.9,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3006,
            longitude: 113.294385,
            latitude: 23.159163,
            title: '广州儿童医院',
            desc: '三甲医院，儿科专科',
            distance: 2.1,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3007,
            longitude: 113.234385,
            latitude: 23.099163,
            title: '广州妇产科医院',
            desc: '三甲医院，妇产科专科',
            distance: 2.4,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3008,
            longitude: 113.304385,
            latitude: 23.169163,
            title: '广州眼科医院',
            desc: '三甲医院，眼科专科',
            distance: 2.7,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3009,
            longitude: 113.224385,
            latitude: 23.089163,
            title: '广州口腔医院',
            desc: '三甲医院，口腔专科',
            distance: 3.0,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 3010,
            longitude: 113.314385,
            latitude: 23.179163,
            title: '广州肿瘤医院',
            desc: '三甲医院，肿瘤专科',
            distance: 3.2,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
    ],

    // 深圳市医院数据
    shenzhen: [
        {
            id: 4001,
            longitude: 114.057868,
            latitude: 22.543099,
            title: '深圳人民医院',
            desc: '三甲医院，综合实力强',
            distance: 0.6,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4002,
            longitude: 114.067868,
            latitude: 22.553099,
            title: '深圳第二人民医院',
            desc: '三甲医院，综合医院',
            distance: 1.1,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4003,
            longitude: 114.047868,
            latitude: 22.533099,
            title: '深圳第三人民医院',
            desc: '三甲医院，传染病专科',
            distance: 1.4,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4004,
            longitude: 114.077868,
            latitude: 22.563099,
            title: '深圳中医院',
            desc: '三甲医院，中医专科',
            distance: 1.7,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4005,
            longitude: 114.037868,
            latitude: 22.523099,
            title: '深圳妇幼保健院',
            desc: '三甲医院，妇产科专科',
            distance: 2.0,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4006,
            longitude: 114.087868,
            latitude: 22.573099,
            title: '深圳儿童医院',
            desc: '三甲医院，儿科专科',
            distance: 2.3,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4007,
            longitude: 114.027868,
            latitude: 22.513099,
            title: '深圳眼科医院',
            desc: '三甲医院，眼科专科',
            distance: 2.6,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4008,
            longitude: 114.097868,
            latitude: 22.583099,
            title: '深圳口腔医院',
            desc: '三甲医院，口腔专科',
            distance: 2.9,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4009,
            longitude: 114.017868,
            latitude: 22.503099,
            title: '深圳肿瘤医院',
            desc: '三甲医院，肿瘤专科',
            distance: 3.2,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 4010,
            longitude: 114.107868,
            latitude: 22.593099,
            title: '深圳心血管医院',
            desc: '三甲医院，心血管专科',
            distance: 3.5,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
    ],

    // 杭州市医院数据
    hangzhou: [
        {
            id: 5001,
            longitude: 120.15507,
            latitude: 30.274084,
            title: '浙江大学医学院附属第一医院',
            desc: '三甲医院，综合实力强',
            distance: 0.7,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5002,
            longitude: 120.16507,
            latitude: 30.284084,
            title: '浙江大学医学院附属第二医院',
            desc: '三甲医院，综合医院',
            distance: 1.2,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5003,
            longitude: 120.14507,
            latitude: 30.264084,
            title: '浙江省人民医院',
            desc: '三甲医院，综合医院',
            distance: 1.5,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5004,
            longitude: 120.17507,
            latitude: 30.294084,
            title: '杭州市第一人民医院',
            desc: '三甲医院，综合医院',
            distance: 1.8,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5005,
            longitude: 120.13507,
            latitude: 30.254084,
            title: '杭州市中医院',
            desc: '三甲医院，中医专科',
            distance: 2.1,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5006,
            longitude: 120.18507,
            latitude: 30.304084,
            title: '杭州市妇产科医院',
            desc: '三甲医院，妇产科专科',
            distance: 2.4,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5007,
            longitude: 120.12507,
            latitude: 30.244084,
            title: '杭州市儿童医院',
            desc: '三甲医院，儿科专科',
            distance: 2.7,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5008,
            longitude: 120.19507,
            latitude: 30.314084,
            title: '杭州市眼科医院',
            desc: '三甲医院，眼科专科',
            distance: 3.0,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5009,
            longitude: 120.11507,
            latitude: 30.234084,
            title: '杭州市口腔医院',
            desc: '三甲医院，口腔专科',
            distance: 3.3,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
        {
            id: 5010,
            longitude: 120.20507,
            latitude: 30.324084,
            title: '杭州市肿瘤医院',
            desc: '三甲医院，肿瘤专科',
            distance: 3.6,
            iconPath: '/static/test/hospital_point.png',
            width: 30,
            height: 30,
        },
    ],
};

// 获取指定城市的医院数据
export const getCityHospitals = (cityName) => {
    return cityHospitalData[cityName] || [];
};

// 获取所有城市列表
export const getAllCities = () => {
    return Object.keys(cityHospitalData);
};

// 获取所有医院数据
export const getAllHospitals = () => {
    const allHospitals = [];
    Object.values(cityHospitalData).forEach((cityHospitals) => {
        allHospitals.push(...cityHospitals);
    });
    return allHospitals;
};

// 根据城市名称获取城市中心坐标
export const getCityCenter = (cityName) => {
    const cityCenters = {
        beijing: {longitude: 116.397128, latitude: 39.916527},
        shanghai: {longitude: 121.473701, latitude: 31.230416},
        guangzhou: {longitude: 113.264385, latitude: 23.129163},
        shenzhen: {longitude: 114.057868, latitude: 22.543099},
        hangzhou: {longitude: 120.15507, latitude: 30.274084},
    };
    return cityCenters[cityName] || {longitude: 116.397128, latitude: 39.916527};
};
